package com.ytjj.qmyx.admin.eunm;

import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description 版块管理
 * @ClassName ForumEnum
 *
 *
 * @Version 1.0
 **/
@Getter
public enum ForumEnumNew {

    LIVE_MANSION("LIVE_MANSION", "9.9生活馆内页"),

    SECKILL("SECKILL", "9.9生活馆区"),

    ZERO_EVALUATION("ZERO_EVALUATION","0元测评"),

    ;

    /**
     * 版块名称
     */
    private String forumType;

    private String forumName;


    ForumEnumNew(String forumType, String forumName) {
        this.forumType = forumType;
        this.forumName = forumName;
    }

    /**
     * @Description 获取版块名称
     *
     *
     *
     * @Version 1.0
     **/
    public static List<String> getForumType() {
        ForumEnumNew[] values = ForumEnumNew.values();
        List<String> forumTypes = new ArrayList<>();
        for (ForumEnumNew value : values) {
            forumTypes.add(value.name());
        }
        return forumTypes;
    }


    /**
     * @Description 获取版块名称
     *
     *
     *
     * @Version 1.0
     **/
    public static String getForumName(String forumType) {
        ForumEnumNew[] values = ForumEnumNew.values();
        for (ForumEnumNew value : values) {
            if(value.forumType.equals(forumType)) {
                return value.getForumName();
            }
        }
        return "";
    }

}
